<?php

namespace app\common\validate;

use think\Validate;

class StReservation extends Validate
{
   // protected $batchValidate = true;
    //定义验证规则
    protected $rule = [
        'user_name|用户姓名' => 'require|max:25',
        'date|预定时间'      => 'require',
        'sub_data|子表属性'  => 'require',
        'company_id|企业ID' => 'require',
    ];

    //定义验证提示
    protected $message = [
        'user_name.require' => '名称必须',
        'date.require'     => '名称最多不能超过25个字符',
        'sub_data.require'   => '年龄必须是数字',
    ];
    protected $scene = [
//        'addStreservation'  =>  ['user_name','date','sub_data'],
//        'updateStreservation' =>  ['id','uid','user_name','date','sub_data'],
    ];
}